<template>
  <view class="contents">
    <view
      class="item_view"
      v-for="(item, index) in list"
      :key="index"
      @click="goPage(item)"
    >
      <view class="item_view_img">
        <image :src="item.file_url" mode=""></image>
      </view>
      <view
        class="item_view_right"
        :class="list.length == index + 1 ? 'item_view_right1' : ''"
      >
        <view
          class="item_view_right_text"
          :class="list.length == index + 1 ? 'item_view_right_text1' : ''"
        >
          {{ item.name }}</view
        >
        <view
          class="item_view_right_schedule"
          :class="
            item.msg_status == '进行中' ? 'item_view_right_schedule_end' : ''
          "
          >{{ item.msg_status }}</view
        >
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    list: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {};
  },
  created() {},
  methods: {
    goPage(item){
      uni.navigateTo({
        url: `/pages/detail/wenDetail?id=${item.id}`,
      });
    }
  },
};
</script>

<style lang="scss" scoped>
.item_view {
  width: 100%;
  display: flex;
  padding-left: 32rpx;
  margin-bottom: 35rpx;
  box-sizing: border-box;
  .item_view_img {
    width: 160rpx;
    height: 160rpx;
    border-radius: 16rpx;
    //   padding: 23rpx 0;
    image {
      width: 160rpx;
      height: 160rpx;
      border-radius: 16rpx;
    }
  }
  .item_view_right {
    flex:1;
    margin-left: 24rpx;
    border-bottom: 1rpx solid #ffffff;
    padding-right: 32rpx;
    padding-bottom: 32rpx;
    .item_view_right_text {
      font-size: 28rpx;
      color: #eeeeee;
      overflow: hidden;
      -webkit-line-clamp: 2;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-box-orient: vertical;
    }
    .item_view_right_text1 {
      color: #adadad;
    }
    .item_view_right_schedule {
      font-size: 26rpx;
      color: #adadad;
      margin-top: 85rpx;
    }
    .item_view_right_schedule_end {
      color: #55b877;
    }
  }
  .item_view_right1 {
    border: none;
  }
}
</style>